<div class="row toolbar">
  <div class="col-md-6">
    <span class="toolbar-header">
      <%= t :patient_list %>
    </span>
  </div>
  <div class="col-md-6 text-right">
    <ul class="toolbar-nav">
      <li><%= link_to feather_icon('circle-plus'), new_appointment_path %></li>
      <li><%= link_to feather_icon('trash'), new_appointment_path %></li>
      <li><%= link_to feather_icon('file-add'), new_appointment_path %></li>
    </ul>
    <input type="text" placeholder="Search" class="search-box" />
  </div>
</div>

<table class="table table-striped">
  <thead>
    <tr>
      <th><%= t :actions %></th>
      <th><%= t :date_translate %> | <%= t :time_translate %></th>
      <th><%= t :patient %></th>
      <th><%= t :staff %></th>
      <th>Status</th>
      <th><%= t :registration_method %></th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    <% @appointments.each do |appointment| %>
      <tr>
        <td>
        <%= link_to simple_icon('note'), edit_appointment_path(appointment) %> 
        <%= link_to feather_icon('trash'), appointment, method: :delete, data: { confirm: 'Are you sure?' } %></td>
        <td><%= link_to appointment.date_appointment.to_s(:date)+" | "+appointment.time_appointment.to_s(:time), appointment %></td>
        <td style="min-width: 100px"><%= link_to appointment.patient.full_name, patient_path(appointment.patient.id) %></td>
        <td style="min-width: 100px"><%= link_to appointment.staff.full_name, staff_path(appointment.staff.id) %></td>
        <td><%= appointment.appointment_status.label %></td>
        <td><%= appointment.registration_method.label %></td>
      </tr>
    <% end %>
  </tbody>
</table>







